import Vue from 'vue'
import request from '@/itsoftUI/utils/request'
import qs from "qs"
const restaurantUrl = Vue.prototype.$itsoftUI.config.serviceUrl + "/supervise"
//录单api
const catalogueApi = {
  // 获取服务范围下拉
  GetScopeTree: function (isShowNoDept) {
    const data = {
      isShowNoDept,
    };
    return request({
      url: restaurantUrl + '/systemServiceScope/getScopeTree',
      method: 'post',
      data: qs.stringify(data)
    })
  },
  // 保存表单
  save: function (data) {
    return request({
      url: restaurantUrl + "/supervisionPost/save",
      method: "post",
      data: data,
      headers: {
        'content-type': 'application/json',
      },
    });
  },

  // 根据范围获取受理人信息
  scopeUsersList: function (scopeIds, typeName) {
    const data = {
      scopeIds,
      typeName
    };
    return request({
      url: restaurantUrl + "/supervisionPost/scopeUsersList",
      method: "post",
      data: qs.stringify(data)
    });
  },
}
export {
  catalogueApi
}